package com.job.webSocket.controller;

import com.job.client.common.result.ResponseResult;
import com.job.webSocket.service.WebSocketService;
import com.job.webSocket.webSocket.WebSocketServer;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.HashSet;

@RestController
@RequestMapping("/api/v1/webSocket")
public class WebSocketController {
    @Autowired
    private WebSocketService webSocketService;
    @PostMapping("/pushMessage")
    @ApiOperation("webSocket推送消息到客户端")
    public ResponseResult pushMessage(@RequestParam String cid,@RequestBody String data){
        return webSocketService.pushMessage(cid,data);
    }
}
